package dao.impl;

import com.google.common.collect.ImmutableMap;
import dao.RewardDao;
import domain.Reward;
import org.springframework.stereotype.Repository;

/**
 * Created by aceyin on 15/7/13.
 */
@Repository
public class RewardDaoImpl extends BaseGenericDao<Reward, Long> implements RewardDao {
    @Override
    public Reward findByRecruitmentAndStatus(long recruitmentId, String status) {
        ImmutableMap<String, Object> params = newMapBuilder().put("recruitment", recruitmentId).put("status", status).build();

        return queryOne("find-by-recruitment-and-status", params);
    }
}
